package com.jinsi.controller.yrf;

import com.jinsi.pojo.SyFabsCollectCensus;
import com.jinsi.pojo.SyKeywordSearch;
import com.jinsi.service.yrf.FabulousCensusService;
import com.jinsi.service.yrf.KeywordSearchService;
import com.jinsi.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 商品课程关键字搜索统计
 * @author 86185
 * @date 2022/10/25
 */
@RestController
@RequestMapping("/keywordSearch")
public class KeywordSearchController {

    @Autowired
    private KeywordSearchService keywordSearchService;

    /**
     * 商品关键字搜索
     * @return 表格数据
     */
    @RequestMapping("/getCommTab")
    public R getCommTab(){

        List<SyKeywordSearch> all = keywordSearchService.getCommTab();
        System.out.println(all);
        return R.ok(all);
    }

    /**
     * 课程关键字搜索
     * @return 表格数据
     */
    @RequestMapping("/getCurrTab")
    public R getCurrTab(){

        List<SyKeywordSearch> all = keywordSearchService.getCurrTab();
        System.out.println(all);
        return R.ok(all);
    }
}
